package com.hosever.controller;

import java.util.List;

import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.hosever.core.AbstractController;
import com.hosever.model.Tag;
import com.hosever.service.TagService;

@Controller
@RequestMapping("/pub/tag")
public class TagController extends
		AbstractController<Tag, TagService> {
	
	@RequestMapping("/list")
	public String tagList(Model model,HttpSession session) {
		List<Tag> tags = this.service.list();
		model.addAttribute("tags", tags);
		session.setAttribute("nav", "tag");
		return getRelativePath("/formList");
	}
}
